<template>
  <div>
    <!-- <labSpecCollection  v-if="code === 'bbqs'"/>
    <labSpecSampling  v-if="code === 'bbcj'"/>
    <labSampleArrive  v-if="code === 'bbsd'"/>
    <labSampleDelivery  v-if="code === 'bbsc'"/> -->
    <labSampleProcessByCode />
  </div>
</template>
<script lang="ts" setup>
// 引入组件区 ==========
import Breadcrumb from '@/components/Breadcrumb.vue'; //面包屑
import { onMounted, ref, reactive, getCurrentInstance } from 'vue';
import { VXETable } from 'vxe-table';
import { AppStore } from '../../../stores/store';
import { IsEmpty, formatDateTime } from '@/utils/common';
import XEClipboard from 'xe-clipboard';
import { VxeMessage, VxeNotifyType } from '../../../utils/CommonMessage';
import UnqualifiedSpecRec from '@/components/UnqualifiedSpecRec.vue';
import labSpecCollection from './labSpecCollection.vue';
import labSpecSampling from './labSpecSampling.vue';
import labSampleArrive from './labSampleArrive.vue';
import labSampleDelivery from './labSampleDelivery.vue';
import labSampleProcessByCode from './LabSampleProcessByCode.vue';



// 全局变量定义区 ==========
let { proxy }: any = getCurrentInstance();
let props = defineProps({}) as any;
let store = AppStore();
let code = ref('');
// 方法定义区 =============
onMounted(() => {
  code.value = proxy.$route.query.code;
  getProcessAttributeListByCode();
});
let processAttributeList = reactive([]); //流程节点属性 

//根据code获取节点下的属性；
function getProcessAttributeListByCode() {
  processAttributeList.length = 0;
  if (IsEmpty(code)) {
    VxeMessage("无法确认跳转的当前界面，请检查标本流程配置中的编码值", VxeNotifyType.error);
    return;
  }
  const url = '/lab/process/attribute/getProcessAttributeListByCode';
  proxy.$http
    .get(url, { params: { code: code } })
    .then(async (res: any) => {
      console.log('res--------------', res);
      if (res.status.code === 200) {
        processAttributeList.push(...res.data);
      }
    })
    .catch((err: any) => {
      proxy.$alert(err, '提示');
    });
}

// #endRegion
</script>
<style lang="scss" scoped>
#specCollection {
  height: 100%;

  .bodyContent {
    height: calc(100% - 60px);

    .el-tabs {
      height: 100%;
      background-color: $base-white;

      :deep(.el-tabs__content) {
        height: calc(100% - 39px - 10px);
        padding: 5px;

        .el-tab-pane {
          height: 100%;

          .button-blue,
          .button-red {
            margin: 5px 0 5px 5px;
          }
        }
      }
    }
  }

  .specSignDetailTable {
    height: calc(100vh - 40px - 82px - 5px);
  }
}
</style>
